package testPureMvc.controller {
	import testPureMvc.ApplicationFacade;
	import testPureMvc.model.XMLProxy;
	import testPureMvc.view.ApplicationMediator;

	import org.puremvc.as3.multicore.interfaces.ICommand;
	import org.puremvc.as3.multicore.interfaces.INotification;
	import org.puremvc.as3.multicore.patterns.command.SimpleCommand;

	/**
	 * @author Admin
	 */
	public class AppStartCommand extends SimpleCommand implements ICommand {
		
		// Constructor
		public function AppStartCommand() 
		{
			
			trace("AppStartCommand init ...");
			
		}


		override public function execute(notification:INotification):void
		{
			var mainStage : Application = notification.getBody() as Application;
			facade.registerMediator(new ApplicationMediator(mainStage));
			
			//register all proxys
			facade.registerProxy(new XMLProxy());
			
			sendNotification(ApplicationFacade.MAIN_SCREEN_SHOW);
		}




	}
}
